package com.qkl.xiatang.app.service.impl;

import com.qkl.xiatang.app.entity.message.MessageEntity;
import com.qkl.xiatang.app.mapper.PondGroupMsgMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class PondGroupMsgService {

    @Autowired
    private PondGroupMsgMapper pondGroupMsgMapper;

    private List<String> queryPondGroupUsers(String companyId,List<String> pondIdList){
        if(ObjectUtils.isEmpty(pondIdList)){
            return new ArrayList<>();
        }
        return pondGroupMsgMapper.queryPondGroupUsers(companyId,pondIdList);
    }

    public List<String> queryPondGroupUsers(MessageEntity entity){
        return this.queryPondGroupUsers(entity.getCompanyId(),entity.getPondIdList());
    }


}
